<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册吧</title>
    <link rel="shortcut icon" href="https://login.yiguo.com/Content/img/yiguo.ico">
    <link href="<%=request.getContextPath() %>/assets/register/public.css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/assets/register/themes.css" rel="stylesheet">
    <script src="<%=request.getContextPath() %>/assets/register/jquery.js"></script>
    <script src="<%=request.getContextPath() %>/assets/register/tab.js"></script>
    
</head>

 

<body id="body">
    <!------- 顶部工具栏开始 ------->
    <div class="w">

        <!------- 顶部工具栏结束 ------->

<link href="<%=request.getContextPath() %>/assets/register/register.css" rel="stylesheet">





   <div class="register">
        <div class="wrap">
            <div class="tabbable">
                <!-- tabs -->
                <ul class="nav-tabs">
                    <li class="active" id="tab1li"><a href="#tab1" data-toggle="tab">手机注册</a></li>
                    <li class="" id="tab2li"><a href="#tab2" data-toggle="tab">邮箱注册</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane clearfix active" id="tab1">
                    <form id="phoneform" method="post">
                        <div class="fl">
                            <p>
                                <span class="field-name">手机号</span>
                                <input class="input input-phone" id="Phone_Mobile" name="phone" placeholder="请输入您的手机号" type="text">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name">设置密码</span>
                                <input class="input input-key" id="password" name="password" placeholder="6-20位字母、符号或数字" type="password">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name">确认密码</span>
                                <input class="input input-key" id="Phone_ConfimPassword" name="Phone_ConfimPassword" placeholder="再次输入密码" type="password">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name"></span><label><input id="tab1chk" checked="checked" type="checkbox">我已阅读并同意<a href="javascript:void(0)" class="green btn-protocol">《易果服务协议》</a><span></span></label>

                            </p>
                            <span></span>
                            <p><span class="field-name"></span><a class="btn-green-l" id="phonereg">立即注册</a></p>
                        </div>
                        </form>
                    </div>
                    <div class="tab-pane clearfix" id="tab2">
                    <form id="mailform">
                        <div class="fl">
                            <p>
                                <span class="field-name">邮箱</span>
                                <input class="input input-mail" id="mail" name="mail" placeholder="请输入您的邮箱" type="text">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name">设置密码</span>
                                <input class="input input-key" id="password" name="password" placeholder="6-20位字母、符号或数字" type="password">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name">确认密码</span>
                                <input class="input input-key" id="Email_ConfimPassword" name="Email_ConfimPassword" placeholder="再次输入密码" type="password">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name">手机号</span>
                                <input class="input input-phone" id="Email_Mobile" name="phone" placeholder="请输入您的手机号" type="text">
                                <span></span>
                            </p>
                            <p>
                                <span class="field-name"></span><label><input id="tab2chk" checked="checked" type="checkbox">我已阅读并同意<a href="javascript:void(0)" class="green btn-protocol">《易果服务协议》</a><span></span></label>
                            </p>
                            <p><span class="field-name"></span><a class="btn-green-l" id="mailreg">立即注册</a></p>
                        </div>
                        </form>
                    </div>
                </div>
                <div class="right">                    
                    我已经注册，现在就 <a class="orange" href="https://login.yiguo.com/">登录</a>
                    
                </div>
            </div>
        </div>
    </div>
  </div>
  
<script type="text/javascript">

	$("#phonereg").click(function(){
		alert($("#phoneform").serialize())
			$.ajax({
				type:"post",
				url:"<%=request.getContextPath()%>/register.action",
				data:$("#phoneform").serialize(),
				dataType:"json",
				success:function(msg){
					if(msg){
						alert("注册成功！")
					}else{
						alert("注册失败！")
					}
				}
			})
});
	
	
	$("#mailreg").click(function(){
		$.ajax({
			type:"post",
			url:"<%=request.getContextPath()%>/register.action",
			data:$("#mailform").serialize(),
			dataType:"json",
			success:function(msg){
				if(msg){
					alert("注册成功！")
				}else{
					alert("注册失败！")
				}
			}
		})
});
</script>
</body>



